package com.dingding.order.core.cancel.dao.impl;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.base.dao.impl.BaseDaoImpl;
import com.dingding.common.core.base.daox.ISQLBaseDao;
import com.dingding.common.core.beans.Userordert;
import com.dingding.common.core.util.ToolUtil;
import com.dingding.order.core.cancel.dao.ICancelUserOrderTDao;
import com.dingding.order.core.cancel.sql.CancelOrderSql;
import com.dingding.order.dto.cancel.PushAutomaticCancelOrderDTO;
import com.dingding.order.dto.cancel.PushCancelOrderDTO;
import com.dingding.order.dto.cancel.ReqCancelOrderDTO;

@Component("cancelUserOrderTDao")
public class CancelUserOrderTDaoImpl extends BaseDaoImpl<Userordert> implements ICancelUserOrderTDao {

	private static final Logger log = Logger.getLogger(CancelUserOrderTDaoImpl.class);

	@Resource(name = "SQLBaseDao")
	private ISQLBaseDao sqlBaseDao;
	
	/**
	 * @Title: getPushCancelOrderInfo 
	 * @Description:
	 *         用户取消订单-获取给司机发送短信和推送的消息 
	 * @param passengerId 乘客Id 
	 * @param driverId 司机Id 
	 * @author yhq 
	 * @return PushCancelOrder 返回类型 
	 * @throws
	 */
	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public PushCancelOrderDTO getPushCancelOrderInfo(String passengerId, String driverId) {

		// 创建乘客支付成功，给司机推送Bean
		PushCancelOrderDTO pushCancelOrderDTO = new PushCancelOrderDTO();

		// 根据司机Id,获取司机信息
		Object[] obj = null;
		try {
			obj = super.sqlQueryUnResultObj(CancelOrderSql.PASSENGER_PAY_PUSH, passengerId, driverId);
		} catch (Exception e) {
			log.info("取消订单获取推送内容时出现异常  类：" + this.getClass() + " getPassengerPayPushInfo()", e);
		}

		// 判断司机信息是否为空
		if (obj != null && obj.length > 0) {

			// 将司机信息赋值给pushPassengerPay
			this.getPushCancelOrder(obj, pushCancelOrderDTO);
		}

		return pushCancelOrderDTO;
	}

	/** 
	 * @Title: getPushCancelOrder 
	 * @Description: 将Object[]类型转为pushConfirmArrival
	 * @param @param obj 司机信息 
	 * @param @param pushCancelOrder  推送对象
	 * @author chenwei
	 * @return void
	 * @throws 
	*/
	public void getPushCancelOrder(Object[] obj, PushCancelOrderDTO pushCancelOrderDTO) {

		// 司机Id(推送Id)
		if (obj[0] != null) {
			pushCancelOrderDTO.setDriverId(obj[0].toString());
		}
		// 设备类型
		if (obj[1] != null) {
			// 设备类型 1:iOS 2:Android
			String userType = obj[1].toString();

			if (userType.equals("1")) { // 设备类型为：iOS
				pushCancelOrderDTO.setLoginEquipment("iOS");
			} else if (userType.equals("2")) { // 设备类型为：Android
				pushCancelOrderDTO.setLoginEquipment("Android");
			}

		}
		// 司机电话
		if (obj[2] != null) {
			pushCancelOrderDTO.setTellPhone(obj[2].toString());
		}
		// 乘客姓名
		if (obj[3] != null) {
			pushCancelOrderDTO.setPassengerName(obj[3].toString());
		}
		// 司机名称
		if (obj[4] != null) {
			pushCancelOrderDTO.setDriverName(obj[4].toString());
		}
		// 车牌号
		if (obj[5] != null) {
			pushCancelOrderDTO.setLisencePlate(obj[5].toString());
		}

	}

	/**
	 * @Title: getCancelOrders 
	 * @Description: 获取待取消订单列表 
	 * @return List
	 *         <PushAutomaticCancelOrder> 返回类型
	 * @throws
	 */
	@Override
	public List<PushAutomaticCancelOrderDTO> getCancelOrders() {

		// 获取待取消订单
		List<Object[]> objects = null;

		try {
			// 获取待取消订单列表
			objects = super.sqlQueryListObj(CancelOrderSql.GET_USER_LIST_BY_CANCEL, false);
		} catch (Exception e) {
			log.error("获取已过期订单时出现异常， 类：" + this.getClass() + " getCancelOrders()", e);
			return null;
		}

		// 判断获取待取消订单是否为空
		if (objects != null && objects.size() > 0) {
			// 如果不为空，则将List<Object[]>转为List<Userordert>
			return this.getUserorderts(objects);
		}

		return null;
	}

	/** 
	 * @Title: getUserorderts 
	 * @Description: 将List<Object[]>对象转为List<Userordert>，用于存储过期订单信息
	 * @param @param obj
	 * @param @return 
	 * @author chenwei
	 * @return List<PushAutomaticCancelOrder>
	 * @throws 
	*/
	public List<PushAutomaticCancelOrderDTO> getUserorderts(List<Object[]> obj) {

		// 创建用于存储过期订单列表的List<Userordert>对象
		List<PushAutomaticCancelOrderDTO> list = new ArrayList<PushAutomaticCancelOrderDTO>();

		for (Object[] objects : obj) {

			// 创建用于存储订单信息的对象
			PushAutomaticCancelOrderDTO pushAutomaticCancelOrderDTO = new PushAutomaticCancelOrderDTO();

			// 订单状态
			if (objects[1] != null) {
				pushAutomaticCancelOrderDTO.setOrderStatus(ToolUtil.castInteger(objects[1]));
			}
			// 下单人角色
			if (objects[2] != null) {
				pushAutomaticCancelOrderDTO.setOrderType(ToolUtil.castInteger(objects[2]));
			}
			// 乘客Id
			if (objects[3] != null) {
				pushAutomaticCancelOrderDTO.setPassengerId(objects[3].toString());
			}
			// 乘客设备类型
			if (objects[4] != null) {
				Integer deviceType = ToolUtil.castInteger(objects[4]);
				pushAutomaticCancelOrderDTO.setPassengerEquipment(deviceType == 1 ? "iOS" : "Android");
			}
			// 乘客姓名
			if (objects[5] != null) {
				pushAutomaticCancelOrderDTO.setPassengerName(objects[5].toString());
			}
			// 乘客电话
			if (objects[6] != null) {
				pushAutomaticCancelOrderDTO.setPassengerPhone(objects[6].toString());
			}
			// 司机id
			if (objects[7] != null) {
				pushAutomaticCancelOrderDTO.setDriverId(objects[7].toString());
			}
			// 司机登录设备
			if (objects[8] != null) {
				Integer deviceType = ToolUtil.castInteger(objects[8]);
				pushAutomaticCancelOrderDTO.setDriverEquipment(deviceType == 1 ? "iOS" : "Android");
			}
			// 司机昵称
			if (objects[9] != null) {
				pushAutomaticCancelOrderDTO.setDriverName(objects[9].toString());
			}
			// 司机电话
			if (objects[10] != null) {
				pushAutomaticCancelOrderDTO.setDriverPhone(objects[10].toString());
			}
			// 支付总金额
			if (objects[11] != null) {
				pushAutomaticCancelOrderDTO.setTotalMoney(new BigDecimal(objects[11].toString()));
			}
			// 乘客推送id
			if (objects[12] != null) {
				pushAutomaticCancelOrderDTO.setPassengerAliasId(objects[12].toString());
			}
			// 司机推送id
			if (objects[13] != null) {
				pushAutomaticCancelOrderDTO.setDriverAliasId(objects[13].toString());
			}
			// 总里程
			if (objects[14] != null) {
				pushAutomaticCancelOrderDTO.setDistance(new BigDecimal(objects[14].toString()));
			}
			// 支付宝支付金额
			if (objects[15] != null) {
				pushAutomaticCancelOrderDTO.setAlipayMoney(new BigDecimal(objects[15].toString()));
			}
			// 叮币支付金额
			if (objects[16] != null) {
				pushAutomaticCancelOrderDTO.setPayMoney(new BigDecimal(objects[16].toString()));
			}
			// 优惠金额
			if (objects[17] != null) {
				pushAutomaticCancelOrderDTO.setCouponMoney(new BigDecimal(objects[17].toString()));
			}

			if (objects.length > 18) {
				// 下单时间
				if (objects[18] != null) {
					pushAutomaticCancelOrderDTO.setCreateTime((Date) objects[18]);
				}
				// 出发时间
				if (objects[19] != null) {
					pushAutomaticCancelOrderDTO.setSetOutTime((Date) objects[19]);
				}
				// 起点
				if (objects[20] != null) {
					pushAutomaticCancelOrderDTO.setStartAddress(objects[20].toString());
				}
				// 终点
				if (objects[21] != null) {
					pushAutomaticCancelOrderDTO.setEndAddress(objects[21].toString());
				}
				// 1:普通 2:长途
				if (objects[22] != null) {
					pushAutomaticCancelOrderDTO.setIsLongDistance(ToolUtil.castInteger(objects[22]));
				}
				// 用户优惠券Id
				if (objects[23] != null) {
					pushAutomaticCancelOrderDTO.setUcId(objects[23].toString());
				}
				// 车牌号
				if (objects[24] != null) {
					pushAutomaticCancelOrderDTO.setLisencePlate(objects[24].toString());
				}
			}

			list.add(pushAutomaticCancelOrderDTO);

		}

		return list;
	}

	/**
	 * 
	 * 取消订单
	 * 
	 * @Title: cancelOrder 
	 * @return  boolean true 成功 false 失败
	 * @author CHEHAUNBO
	 * 
	 */
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public boolean cancelOrder(ReqCancelOrderDTO reqCancelOrderDTO, String orderId) {

		try {

			int row = super.updateSqlRow(CancelOrderSql.CANCEL_ORDER, reqCancelOrderDTO.getCancelType(),
					reqCancelOrderDTO.getCancelNumber(), reqCancelOrderDTO.getCancelDesc(),
					reqCancelOrderDTO.getUserID(), orderId);

			int row_2 = super.updateSqlRow(CancelOrderSql.DELETE_ORDER, orderId);

			if (row != 0 && row_2 != 0) {
				return true;
			}

		} catch (Exception e) {
			log.error("取消订单出现异常！", e);
		}

		return false;
	}

	/**
	 * 
	 * 根据父订单ID，获取所属当前订单的子订单数
	 * 
	 * 如果是车主取消订单，并且存在子单的情况下，要判断是否是最后订单。如果是最后订单，需要将父订单一并取消
	 * 
	 * @Title: getChildranCount 
	 * @return  int 子订单数量
	 * @author CHEHAUNBO
	 * 
	 */
	@Override
	@Transactional(readOnly=true)
	public int getChildranCount(String orderId) {

		// 获取父订单ID
		int count = 0;
		try {

			count = super.sqlQueryGetCount(CancelOrderSql.GET_CHILDREN_COUNT, orderId);

		} catch (Exception e) {
			log.error("取消订单，根据父订单ID获取所属子订单出现异常！", e);
		}

		return count;

	}

	/** 
	 * 
	 * @Title: getUserOrder 
	 * @Description: 获取订单信息
	 * @param orderId  订单Id
	 * @author chenwei
	 * 
	 */
	@Override
	@Transactional(readOnly = true)
	public Userordert getUserOrder(String orderId) {

		// 根据订单ID查询订单信息
		Userordert userordert = null;

		try {
			// 添加查询条件
			Criterion criterion = Restrictions.eq("oid", orderId);
			userordert = super.queryCriteriaUnResult(criterion);
		} catch (Exception e) {
			log.error("获取订单信息出现异常！", e);
		}

		return userordert;

	}

	/**
	 * @Description:获取所有合乘订单
	 * @param parOrderId  主订单Id
	 * @author fengshuonan
	 * @return List<Userordert> 所有合乘订单
	 */
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public List<Userordert> getAllCarShareOrder(String parOrderId) {

		List<Userordert> list = null;

		Criterion criterion = Restrictions.or(Restrictions.eq("oid", parOrderId),Restrictions.eq("parOrderId", parOrderId));

		try {
			list = this.queryCriteriaList(criterion);
		} catch (Exception e) {
			log.error("获取所有合乘订单出错！ConfirmArriveDaoImpl : getAllCarShareOrder()", e);
		}

		return list;
	}

	/**
	 * 
	 * @Title: deleteCurrentOrder 
	 * @Description: 移除订单
	 * @param userordert 订单信息
	 * @author YHQ 
	 * @return boolean true:成功  false:失败
	 * 
	 */
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public boolean deleteCurrentOrder(Userordert userordert) {

		try {
			super.delete(userordert);
		} catch (Exception e) {
			log.error("确认到达移除订单时出现异常   类：" + this.getClass() + " deleteCurrentOrder()", e);
			return false;
		}

		return true;
	}

	/**
	 * 
	 * @Title: getUserOrderByAutoCancel
	 * @Description: 获取自动取消订单列表
	 * @author yuHaiQing
	 * @return List<Userordert>    返回类型
	 * 
	 */
	@Override
	@Transactional(readOnly=true)
	public List<Userordert> getUserOrderByAutoCancel() {
		
		try {
			
			List<Object[]> objects = super.sqlQueryListObj(CancelOrderSql.AUTO_CANCEL_ORDER_LIST, false);
			
			if(objects != null && objects.size() > 0){
				
				return getUserOrders(objects);
			}
		} catch (Exception e) {
			log.error("获取自动取消的订单列表时出现异常   类："+this.getClass()+" getUserOrdertByOverTime()", e);
		}
		
		return null;
	}

	/**
	 * 
	 * @Title: getUserOrders 
	 * @Description: 自动取消订单信息 
	 * @param objects 订单信息
	 * @author YHQ 
	 * @return void    返回类型
	 * 
	 */
	public List<Userordert> getUserOrders(List<Object[]> objects){
		
		List<Userordert> userorderts = new ArrayList<Userordert>();
		
		for (Object[] obj : objects) {
			
			Userordert userordert = new Userordert();
			
			if(obj[0] != null){
				userordert.setOid(obj[0].toString());
			}
			if(obj[1] != null){
				userordert.setPlaceOrderUserId(obj[1].toString());
			}
			if(obj[2] != null){
				userordert.setPayCity(obj[2].toString());
			}
			if(obj[3] != null){
				userordert.setSetOutTime((Date)obj[3]);
			}
			if(obj[4] != null){
				userordert.setStartAddress(obj[4].toString());
			}
			if(obj[5] != null){
				userordert.setStartLongitude(ToolUtil.castDouble(obj[5]));
			}
			if(obj[6] != null){
				userordert.setStartLatitude(ToolUtil.castDouble(obj[6]));
			}
			if(obj[7] != null){
				userordert.setEndAddress(obj[7].toString());
			}
			if(obj[8] != null){
				userordert.setEndLongitude(ToolUtil.castDouble(obj[8]));
			}
			if(obj[9] != null){
				userordert.setEndLatitude(ToolUtil.castDouble(obj[9]));
			}
			if(obj[10] != null){
				userordert.setDistance(new BigDecimal(obj[10].toString()));
			}
			if(obj[11] != null){
				userordert.setPayMoney(new BigDecimal(obj[11].toString()));
			}
			if(obj[12] != null){
				userordert.setAlipayMoney(new BigDecimal(obj[12].toString()));
			}
			if(obj[13] != null){
				userordert.setPayType(ToolUtil.castInteger(obj[13]));
			}
			if(obj[14] != null){
				userordert.setUcId(obj[14].toString());
			}
			if(obj[15] != null){
				userordert.setCouponMoney(new BigDecimal(obj[15].toString()));
			}
			if(obj[16] != null){
				userordert.setTotalMoney(new BigDecimal(obj[16].toString()));
			}
			if(obj[17] != null){
				userordert.setNumber(ToolUtil.castInteger(obj[17]));
			}
			if(obj[18] != null){
				userordert.setRedBag(ToolUtil.castInteger(obj[18]));
			}
			if(obj[19] != null){
				userordert.setMessage(obj[19].toString());
			}
			if(obj[20] != null){
				userordert.setPayDistance(new BigDecimal(obj[20].toString()));
			}
			if(obj[21] != null){
				userordert.setMarker(obj[21].toString());
			}
			if(obj[22] != null){
				userordert.setGrabOrderUserId(obj[22].toString());
			}
			if(obj[23] != null){
				userordert.setGrabOrderTime((Date)obj[23]);
			}
			if(obj[24] != null){
				userordert.setOrderStatus(ToolUtil.castInteger(obj[24]));
			}
			if(obj[25] != null){
				userordert.setCreateTime((Date)obj[25]);
			}
			if(obj[26] != null){
				userordert.setPayTime((Date)obj[26]);
			}
			if(obj[27] != null){
				userordert.setEndTime((Date)obj[27]);
			}
			if(obj[28] != null){
				userordert.setCancelTime((Date)obj[28]);
			}
			if(obj[29] != null){
				userordert.setOrderType(ToolUtil.castInteger(obj[29]));
			}
			if(obj[30] != null){
				userordert.setCancelType(ToolUtil.castInteger(obj[30]));
			}
			if(obj[31] != null){
				 userordert.setCancelNumber(ToolUtil.castInteger(obj[31]));
			}      
			if(obj[32] != null){
				 userordert.setCancelDesc(obj[32].toString());
			}      
			if(obj[33] != null){
				 userordert.setIsLongDistance(ToolUtil.castInteger(obj[33]));
			}      
			if(obj[34] != null){
				 userordert.setPsgRcvIntegral(new BigDecimal(obj[34].toString()));
			}      
			if(obj[35] != null){
				 userordert.setDriverRcvIntegral(new BigDecimal(obj[35].toString()));
			}      
			if(obj[36] != null){
				 userordert.setCancelUserId(obj[36].toString());
			}      
			if(obj[37] != null){
				 userordert.setIsComment(ToolUtil.castInteger(obj[37]));
			}      
			if(obj[38] != null){
				 userordert.setIsCarShare(ToolUtil.castInteger(obj[38]));
			}      
			if(obj[39] != null){
				 userordert.setSetOutCondition(ToolUtil.castInteger(obj[39]));
			}
			if(obj[40] != null){
				 userordert.setFreeSeat(ToolUtil.castInteger(obj[40]));
			}
			if(obj[41] != null){
				 userordert.setParOrderId(obj[41].toString());
			}
			if(obj[42] != null){
				userordert.setIsChildren(ToolUtil.castInteger(obj[42]));
			}
			
			userorderts.add(userordert);
		}
		
		return userorderts;
	}

	
	/**
	 * 
	 * @Title: geAutomaticCancelOrderDTO 
	 * @Description: 获取自动取消的通知类
	 * @param passengerId 乘客Id
	 * @param driverId 司机Id
	 * @author YHQ 
	 * @return PushAutomaticCancelOrderDTO    返回类型
	 * 
	 */
	@Override
	@Transactional(propagation=Propagation.REQUIRED)
	public PushAutomaticCancelOrderDTO geAutomaticCancelOrderDTO(String passengerId, String driverId,String oid) {
		
		PushAutomaticCancelOrderDTO pushAutomaticCancelOrderDTO = new PushAutomaticCancelOrderDTO();
		
		//自动取消通知类信息(推送消息、发送短信内容)
		Object[] obj = null;
		try {
			obj = super.sqlQueryUnResultObj(CancelOrderSql.GET_USER_LIST_BY_AUTO_CANCEL,oid);
		} catch (Exception e) {
			log.error("获取自动取消的通知类时出现异常   类："+this.getClass()+" geAutomaticCancelOrderDTO()", e);
		}
		
		// 判断司机信息是否为空
		if (obj != null) {

			// 将司机信息赋值给pushPassengerPay
			this.getPushAutoCancelOrder(pushAutomaticCancelOrderDTO,obj);
		}
		
		return pushAutomaticCancelOrderDTO;
	}
	
	/**
	 * 
	 * @Title: getPushAutoCancelOrder 
	 * @Description: 将自动取消通知消息转为PushAutomaticCancelOrderDTO类型对象
	 * @param pushAutomaticCancelOrderDTO 存储自动取消通知类对象
	 * @param obj 自动取消通知类消息内容
	 * @author YHQ 
	 * @return PushAutomaticCancelOrderDTO    返回类型
	 * 
	 */
	public PushAutomaticCancelOrderDTO getPushAutoCancelOrder(PushAutomaticCancelOrderDTO pushAutomaticCancelOrderDTO,Object[] obj){
		
		// 订单状态
		if (obj[1] != null) {
			pushAutomaticCancelOrderDTO.setOrderStatus(ToolUtil.castInteger(obj[1]));
		}
		// 下单人角色
		if (obj[2] != null) {
			pushAutomaticCancelOrderDTO.setOrderType(ToolUtil.castInteger(obj[2]));
		}
		// 乘客Id
		if (obj[3] != null) {
			pushAutomaticCancelOrderDTO.setPassengerId(obj[3].toString());
		}
		// 乘客设备类型
		if (obj[4] != null) {
			Integer deviceType = ToolUtil.castInteger(obj[4]);
			pushAutomaticCancelOrderDTO.setPassengerEquipment(deviceType == 1 ? "iOS" : "Android");
		}
		// 乘客姓名
		if (obj[5] != null) {
			pushAutomaticCancelOrderDTO.setPassengerName(obj[5].toString());
		}
		// 乘客电话
		if (obj[6] != null) {
			pushAutomaticCancelOrderDTO.setPassengerPhone(obj[6].toString());
		}
		// 司机id
		if (obj[7] != null) {
			pushAutomaticCancelOrderDTO.setDriverId(obj[7].toString());
		}
		// 司机登录设备
		if (obj[8] != null) {
			Integer deviceType = ToolUtil.castInteger(obj[8]);
			pushAutomaticCancelOrderDTO.setDriverEquipment(deviceType == 1 ? "iOS" : "Android");
		}
		// 司机昵称
		if (obj[9] != null) {
			pushAutomaticCancelOrderDTO.setDriverName(obj[9].toString());
		}
		// 司机电话
		if (obj[10] != null) {
			pushAutomaticCancelOrderDTO.setDriverPhone(obj[10].toString());
		}
		// 支付总金额
		if (obj[11] != null) {
			pushAutomaticCancelOrderDTO.setTotalMoney(new BigDecimal(obj[11].toString()));
		}
		// 乘客推送id
		if (obj[12] != null) {
			pushAutomaticCancelOrderDTO.setPassengerAliasId(obj[12].toString());
		}
		// 司机推送id
		if (obj[13] != null) {
			pushAutomaticCancelOrderDTO.setDriverAliasId(obj[13].toString());
		}
		// 总里程
		if (obj[14] != null) {
			pushAutomaticCancelOrderDTO.setDistance(new BigDecimal(obj[14].toString()));
		}
		// 支付宝支付金额
		if (obj[15] != null) {
			pushAutomaticCancelOrderDTO.setAlipayMoney(new BigDecimal(obj[15].toString()));
		}
		// 叮币支付金额
		if (obj[16] != null) {
			pushAutomaticCancelOrderDTO.setPayMoney(new BigDecimal(obj[16].toString()));
		}
		// 优惠金额
		if (obj[17] != null) {
			pushAutomaticCancelOrderDTO.setCouponMoney(new BigDecimal(obj[17].toString()));
		}

		if (obj.length > 18) {
			// 下单时间
			if (obj[18] != null) {
				pushAutomaticCancelOrderDTO.setCreateTime((Date) obj[18]);
			}
			// 出发时间
			if (obj[19] != null) {
				pushAutomaticCancelOrderDTO.setSetOutTime((Date) obj[19]);
			}
			// 起点
			if (obj[20] != null) {
				pushAutomaticCancelOrderDTO.setStartAddress(obj[20].toString());
			}
			// 终点
			if (obj[21] != null) {
				pushAutomaticCancelOrderDTO.setEndAddress(obj[21].toString());
			}
			// 1:普通 2:长途
			if (obj[22] != null) {
				pushAutomaticCancelOrderDTO.setIsLongDistance(ToolUtil.castInteger(obj[22]));
			}
			// 用户优惠券Id
			if (obj[23] != null) {
				pushAutomaticCancelOrderDTO.setUcId(obj[23].toString());
			}
			// 车牌号
			if (obj[24] != null) {
				pushAutomaticCancelOrderDTO.setLisencePlate(obj[24].toString());
			}
		}
		
		return pushAutomaticCancelOrderDTO;
		
	}
	
}
